Repository navigation
Java: Standardize hooks + middleware implementation with other languages - #1519
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
bgentry
left a comment
There was a problem hiding this comment.
I'm not seeing a changelog here, but otherwise LGTM
I noticed today that Java had been done something a little weird in that
instead of hooks/middleware like in Go, we ended up with a broad
`Extension` interface that does everything.
Here, give Java a more normal implementation compared to other
languages. We have specific hooks/middleware like:
public interface HookInsertBegin extends Hook {
/**
* Runs in the insertion's transaction. Throwing fails and rolls back the insertion, including
* application writes made using this connection. Options are the caller's overrides, before
* merging with job-type defaults.
*/
void insertBegin(Connection connection, JobType<?> type, Object args, InsertOptions options)
throws Exception;
}
Which extends from a base like `Hook`:
public interface Hook extends Plugin {}
Which extends from `Plugin` so that everything can be set together:
public interface Plugin {}
f7bafb0 to
47abdf5
Compare
|
Thx.
Added. This is kind of a weird one though still because there's no official Java release yet so technically no changes to log. |
I noticed today that Java had been done something a little weird in that
instead of hooks/middleware like in Go, we ended up with a broad
Extensioninterface that does everything.Here, give Java a more normal implementation compared to other
languages. We have specific hooks/middleware like:
Which extends from a base like
Hook:Which extends from
Pluginso that everything can be set together: